bazel build -c opt --strip=always //cc/appcoin2/strategy/mm_pilot:simple_mm
bazel build -c opt --strip=always //cc/appcoin2/experimental/xguo:oe_dumper

COIN_ROOT="$(git rev-parse --show-toplevel)"
COIN_BINARY_ROOT=$COIN_ROOT/../coin_binary

function deploy_coin2_app {
  mkdir -p $COIN_BINARY_ROOT/coin2-bazel-bin-3.10/$1
  rsync -avh --delete -L $COIN_ROOT/bazel-bin/$1/$2 $COIN_BINARY_ROOT/coin2-bazel-bin-3.10/$1/
}

set -x
deploy_coin2_app cc/appcoin2/strategy/mm_pilot simple_mm
deploy_coin2_app cc/appcoin2/experimental/xguo oe_dumper

echo "Build and Copy to coin_binary Successfully!!"
echo "You must push your binary by using git lfs later!!"
